package timing.ukulele.storage.entity;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.List;

/**
 * 用户实体
 */
@Document("user")
@Getter
@Setter
public class UserEntity implements Serializable {
    @Id
    private String id;

    @Field("account")
    private String account;

    @Field("name")
    private String name;

    @Field("password")
    private String password;

    @Field("group")
    private List<String> group;

    @Field("private_key")
    private String privateKey;

    @Field("public_key")
    private String publicKey;

    @Field("active")
    private Boolean active;

    @Field("role")
    private String role = "user";
}
